﻿@using MvcAtletIS.Helpers;
@model IEnumerable<MvcAtletIS.Models.Competitors>

@{
    ViewBag.Title = "Môj klub";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Editovať členov môjho klubu</h2>

<p>
    @Html.ActionLink("Pridať nového člena", "Create") | 
    @Html.ActionLink("Naspäť na môj klub", "Index", "Home")
</p>

<table width="50%">
    <tr>
        <th width="10%">
            Priezvisko
        </th>
        <th width="10%">
            Meno
        </th>
        <th width="10%">
            Dátum narodenia
        </th>
        <th width="5%">
            Pretekár
        </th>
        <th width="5%">
            Tréner
        </th>
        <th width="5%">
            Rozhodca
        </th>
        <th width="5%"></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Surname)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Firstname)
        </td>
        <td align="right">
            @Html.DisplayFor(modelItem => item.Birthdate)
        </td>
        <td align="center">
            @Html.DisplayFor(modelItem => item.Competitor)
        </td>
        <td align="center">
            @Html.DisplayFor(modelItem => item.CoachClass)
        </td>
        <td align="center">
            @Html.DisplayFor(modelItem => item.RefereeClass)
        </td>
        <td align="center">
            @Html.ImageActionLink(Url.Content("~/Content/icons/edit.gif"), "", "Edit", new { id = item.ID }, new { title = "Editovať", border = 0, hspace = 2 })
        </td>
    </tr>
}

</table>

<p>
    @Html.ActionLink("Pridať nového člena", "Create") | 
    @Html.ActionLink("Naspäť na môj klub", "Index", "Home")
</p>

